Optimal. Leaf size=84 \[ \frac {b \csc (c+d x)}{a^2 d}-\frac {\left (a^2-b^2\right ) \log (\sin (c+d x))}{a^3 d}+\frac {\left (a^2-b^2\right ) \log (a+b \sin (c+d x))}{a^3 d}-\frac {\csc ^2(c+d x)}{2 a d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.09, antiderivative size = 84, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {2721, 894} \[ -\frac {\left (a^2-b^2\right ) \log (\sin (c+d x))}{a^3 d}+\frac {\left (a^2-b^2\right ) \log (a+b \sin (c+d x))}{a^3 d}+\frac {b \csc (c+d x)}{a^2 d}-\frac {\csc ^2(c+d x)}{2 a d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 894
Rule 2721
Rubi steps
\begin {align*} \int \frac {\cot ^3(c+d x)}{a+b \sin (c+d x)} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {b^2-x^2}{x^3 (a+x)} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac {\operatorname {Subst}\left (\int \left (\frac {b^2}{a x^3}-\frac {b^2}{a^2 x^2}+\frac {-a^2+b^2}{a^3 x}+\frac {a^2-b^2}{a^3 (a+x)}\right ) \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac {b \csc (c+d x)}{a^2 d}-\frac {\csc ^2(c+d x)}{2 a d}-\frac {\left (a^2-b^2\right ) \log (\sin (c+d x))}{a^3 d}+\frac {\left (a^2-b^2\right ) \log (a+b \sin (c+d x))}{a^3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.16, size = 65, normalized size = 0.77 \[ -\frac {2 \left (a^2-b^2\right ) (\log (\sin (c+d x))-\log (a+b \sin (c+d x)))+a^2 \csc ^2(c+d x)-2 a b \csc (c+d x)}{2 a^3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.79, size = 118, normalized size = 1.40 \[ -\frac {2 \, a b \sin \left (d x + c\right ) - a^{2} - 2 \, {\left ({\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} - a^{2} + b^{2}\right )} \log \left (b \sin \left (d x + c\right ) + a\right ) + 2 \, {\left ({\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} - a^{2} + b^{2}\right )} \log \left (-\frac {1}{2} \, \sin \left (d x + c\right )\right )}{2 \, {\left (a^{3} d \cos \left (d x + c\right )^{2} - a^{3} d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.18, size = 88, normalized size = 1.05 \[ -\frac {\frac {2 \, {\left (a^{2} - b^{2}\right )} \log \left ({\left | \sin \left (d x + c\right ) \right |}\right )}{a^{3}} - \frac {2 \, {\left (a^{2} b - b^{3}\right )} \log \left ({\left | b \sin \left (d x + c\right ) + a \right |}\right )}{a^{3} b} - \frac {2 \, a b \sin \left (d x + c\right ) - a^{2}}{a^{3} \sin \left (d x + c\right )^{2}}}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.45, size = 106, normalized size = 1.26 \[ \frac {\ln \left (a +b \sin \left (d x +c \right )\right )}{d a}-\frac {b^{2} \ln \left (a +b \sin \left (d x +c \right )\right )}{a^{3} d}-\frac {1}{2 d a \sin \left (d x +c \right )^{2}}-\frac {\ln \left (\sin \left (d x +c \right )\right )}{a d}+\frac {b^{2} \ln \left (\sin \left (d x +c \right )\right )}{a^{3} d}+\frac {b}{d \,a^{2} \sin \left (d x +c \right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.31, size = 77, normalized size = 0.92 \[ \frac {\frac {2 \, {\left (a^{2} - b^{2}\right )} \log \left (b \sin \left (d x + c\right ) + a\right )}{a^{3}} - \frac {2 \, {\left (a^{2} - b^{2}\right )} \log \left (\sin \left (d x + c\right )\right )}{a^{3}} + \frac {2 \, b \sin \left (d x + c\right ) - a}{a^{2} \sin \left (d x + c\right )^{2}}}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 11.76, size = 144, normalized size = 1.71 \[ \frac {b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,a^2\,d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,a\,d}-\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (a^2-b^2\right )}{a^3\,d}-\frac {\frac {a}{2}-2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4\,a^2\,d\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}+\frac {\ln \left (a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+a\right )\,\left (a^2-b^2\right )}{a^3\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________